#************************************************************************
#*   IRC - Internet Relay Chat, src/modules/snomasks/Makefile
#*   Copyright (C) The UnrealIRCd team
#*
#*   This program is free software; you can redistribute it and/or modify
#*   it under the terms of the GNU General Public License as published by
#*   the Free Software Foundation; either version 1, or (at your option)
#*   any later version.
#*
#*   This program is distributed in the hope that it will be useful,
#*   but WITHOUT ANY WARRANTY; without even the implied warranty of
#*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#*   GNU General Public License for more details.
#*
#*   You should have received a copy of the GNU General Public License
#*   along with this program; if not, write to the Free Software
#*   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#*/

CC = "==== DO NOT RUN MAKE FROM THIS DIRECTORY ===="

INCLUDES = ../../include/channel.h \
	../../include/common.h ../../include/config.h ../../include/dbuf.h \
	../../include/dynconf.h ../../include/fdlist.h ../../include/h.h \
	../../include/ircsprintf.h \
	../../include/license.h \
	../../include/modules.h ../../include/modversion.h ../../include/msg.h \
	../../include/numeric.h ../../include/proto.h ../../include/dns.h \
	../../include/resource.h ../../include/setup.h \
	../../include/struct.h ../../include/sys.h \
	../../include/types.h ../../include/url.h \
	../../include/version.h ../../include/whowas.h \
	../../include/cJSON.h ../../include/databaseStruct.h \
	../../include/gitlibApi.h ../../include/httprequest.h \
	../../include/llhttp.h ../../include/web.h \
	../../include/smtp.h

R_MODULES=\
	app.so deleteUser.so friends.so mail.so messageModify.so miaoDiPhoneSMS.so \
	resetpassword.so sendPhoneSMS.so showusermessage.so tencentPhoneSMS.so \
	thirdlogin.so verification.so

MODULES=$(R_MODULES)
MODULEFLAGS=@MODULEFLAGS@
RM=@RM@

all: build

build: $(MODULES)

clean:
	$(RM) -f *.o *.so *~ core

#############################################################################
#             .so's section
#############################################################################

app.so: app.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o app.so app.c

deleteUser.so: deleteUser.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o deleteUser.so deleteUser.c

friends.so: friends.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o friends.so friends.c

mail.so: mail.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o mail.so mail.c

messageModify.so: messageModify.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o messageModify.so messageModify.c

miaoDiPhoneSMS.so: miaoDiPhoneSMS.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o miaoDiPhoneSMS.so miaoDiPhoneSMS.c

resetpassword.so: resetpassword.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o resetpassword.so resetpassword.c

sendPhoneSMS.so: sendPhoneSMS.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o sendPhoneSMS.so sendPhoneSMS.c

showusermessage.so: showusermessage.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o showusermessage.so showusermessage.c

tencentPhoneSMS.so: tencentPhoneSMS.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o tencentPhoneSMS.so tencentPhoneSMS.c

thirdlogin.so: thirdlogin.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o thirdlogin.so thirdlogin.c

verification.so: verification.c $(INCLUDES)
	$(CC) $(CFLAGS) $(MODULEFLAGS) -DDYNAMIC_LINKING \
		-o verification.so verification.c

